package com.itheima.spring.bestpractive.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.itheima.spring.bestpractive.pojo.Employee;
import com.itheima.spring.bestpractive.vo.req.employee.EmpLogin2ReqVo;
import com.itheima.spring.bestpractive.vo.req.employee.EmpReqAdminVo;
import com.itheima.spring.bestpractive.vo.req.employee.EmpReqVo;
import com.itheima.spring.bestpractive.vo.req.employee.EmpUpdataVo;
import com.itheima.spring.bestpractive.vo.resp.employee.EmpRespVo;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * @version 1.0
 * @author: HZY
 * @date: 2025/6/24 23:50
 * @Content: 员工服务
 */

public interface EmpService {
    @Operation(description = "登录：获取员工信息，并更新token")
    EmpRespVo getEmp(EmpReqVo empReqVo) throws JsonProcessingException;
    @Operation(description = "退出登录")
    void logout(long employeeId);
    @Operation(description = "员工注册，默认为普通员工")
    void empAdd(EmpReqAdminVo empVo, MultipartFile  file);
    @Operation(description = "从缓存获取员工信息")
    EmpRespVo getEmpFromCache(long employeeId) throws JsonProcessingException;
    @Operation(description = "获取全部考核人员")
    List<EmpRespVo> getAllEvaluator();
    @Operation(description = "获取全部员工")
    List<EmpRespVo> getAllEmp(int pageNum, int pageSize);
    @Operation(description = "根据员工编号和电话获取员工信息")
    long getEmpByPhoneAndId(EmpLogin2ReqVo reqVo);
    @Operation(description = "根据员工编号，更改员工密码")
    void updateEmpPassword(Employee employee);
    @Operation(description = "修改员工信息")
    void updateEmp(EmpUpdataVo empVo, MultipartFile photo);
    @Operation(description = "根据员工编号和计划编号修改计划的状态")
    void updatePlanStatus(Map<String, Object>  data);
}
